Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nanocolors

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nanocolors

4x times faster than chalk and use 5x less space in node_modules

  • 0.2.13
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
246K
decreased by-12.48%
Maintainers
1
Weekly downloads
 
Created

What is nanocolors?

Nanocolors is a tiny and fast library for coloring terminal output. It provides a simple API to style text with various colors and effects, making it easier to create visually appealing command-line interfaces.

What are nanocolors's main functionalities?

Basic Colors

Nanocolors allows you to easily apply basic colors to your text output in the terminal. The example demonstrates how to use red, green, and blue colors.

const { red, green, blue } = require('nanocolors');
console.log(red('This is red text'));
console.log(green('This is green text'));
console.log(blue('This is blue text'));

Text Effects

In addition to colors, Nanocolors supports various text effects such as bold, underline, and italic. The example shows how to apply these effects to your text.

const { bold, underline, italic } = require('nanocolors');
console.log(bold('This is bold text'));
console.log(underline('This is underlined text'));
console.log(italic('This is italic text'));

Combining Colors and Effects

Nanocolors allows you to combine colors and text effects to create more complex styles. The example demonstrates combining red with bold and green with underline.

const { red, bold, underline } = require('nanocolors');
console.log(red(bold('This is bold and red text')));
console.log(underline(green('This is underlined and green text')));

Other packages similar to nanocolors

Keywords

FAQs

Package last updated on 09 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc